set
	i    /i1 * i20/
	j    /j1 * j50/;

Options SEED = 1222;

Parameters
	A(j, i)
	b(j)
	c(i)
	p(j)
	bigm(j)
;

A(j,i) = uniform(0,1);
b(j) = uniform(0,1);
c(i) = uniform(1,1);
p(j) = uniform(0,1);
bigm(j) = 1000;

Scalars
	p_sum
	alpha;

p_sum = sum(j, p(j));
p(j) = p(j) / p_sum;

alpha = 0.5;

Variables
	x(i)
	y(j)
	z;
Binary variable y;
Positive variable x;

Equations
	cost
	knapsack
	chance(j);
cost..            z =e= sum(i, x(i) * c(i));
knapsack..    alpha =l= sum(j, p(j) * y(j));
chance(j)..   sum(i, A(j, i) * x(i)) - b(j) =g= bigm(j) * (y(j) - 1);

Model chance_mod /cost, knapsack, chance/;

option mip = glpk;
Solve chance_mod using mip minimizing z;

display x.L, y.L;

*bigm(j) = 

	
	
	